#ifndef _NAVIGATION_H
#define _NAVIGATION_H

#include "base_drv/drv_conf.h"
#include HAL_INCLUDE

typedef __packed struct
{
uint8_t header; //0x5A
  uint8_t start_flag;

  uint16_t crc_sum;
}tx_bag;


typedef __packed struct{
	uint8_t header; // A5
	float Vx;
	float VY;
	float Wz;
//	struct ext_sentry_cmd_t sentry_decision_making;
	uint16_t crc_sum;
}rx_bag;

typedef __packed struct{
	//uint8_t header; // A5
	float Vx;
	float VY;
	//float Wz;
	//uint16_t crc_sum;
}rx_bag_send_to_chassis;


#define VISION_INF_USB1 0
#define VISION_CTRL_FRAME_LEN1 (sizeof(rx_bag))
	
#if VISION_INF_USB1 == 0
#define VISION_UART_HANDLE huart1
#define VISION_UART USART1

void vision_uart_idle_handler(UART_HandleTypeDef* huart);
HAL_StatusTypeDef vision_uart_dma_recv_init(void);

//#else

uint8_t parse_vision_data1(uint8_t* buf, uint16_t len);
#endif



//void set_vision_req_ang(float pitch, float yaw);

void send_vision_request1(float current_pitch, float current_yaw);



#endif
